<%= form_for(@promotion_mail, multipart: true, html: {class: 'form-horizontal'}) do |f| %>
  <% if @promotion_mail.errors.any? %>
    <div class="alert alert-dismissable alert-danger">
      <button type="button" class="close" data-dismiss="alert">×</button>
      <h4>Warning!</h4>
      <strong><%= pluralize(@promotion_mail.errors.count, "error") %> prohibited this promotion_mail from being saved:</strong> <a href="#" class="alert-link">Change a few things up</a> and try submitting again.
      <% @promotion_mail.errors.full_messages.each do |msg| %>
      <p><%= msg %></p>
      <% end %>
    </div>
  <% end %>

  <fieldset>
    <div class="form-group">
      <%= f.label :subject, class: 'col-lg-2 control-label' %>
      <div class="col-lg-10">
        <%= f.text_field :subject, class: 'form-control' %>
      </div>
    </div>
    <div class="form-group">
      <%= f.label :text_part, class: 'col-lg-2 control-label' %>
      <div class="col-lg-10">
        <%= f.text_area :text_part, class: 'form-control', rows: 10 %>
      </div>
    </div>
    <div class="form-group">
      <%= f.label :html_part, class: 'col-lg-2 control-label' %>
      <div class="col-lg-10">
        <%= f.text_area :html_part, class: 'form-control', rows: 20 %>
      </div>
    </div>
    <div class="form-group">
      <%= f.label :attachment, class: 'col-lg-2 control-label' %>
      <div class="col-lg-10">
        <%= f.file_field :attachment, class: 'form-control' %>
      </div>
    </div>
    <div class="form-group">
      <div class="col-lg-10 col-lg-offset-2">
        <div class="checkbox">
          <label>
            <%= f.check_box :draft %> Draft?
          </label>
        </div>
      </div>
    </div>
    <div class="form-group">
      <div class="col-lg-10 col-lg-offset-2">
        <%= f.submit class: 'btn btn-primary' %>
      </div>
    </div>
  </fieldset>
<% end %>
